<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/shape_group.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">shape_group.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="shape__group_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="shape__group_8h.html">collision/shape_group.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fcl__collision__queries_8h.html">collision/solvers/fcl/fcl_collision_queries.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fcl__helpers_8h.html">collision/solvers/fcl/fcl_helpers.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#add8e127504ac6e95176a1709e132342a">    7</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="classcollision_1_1_shape_group.html#add8e127504ac6e95176a1709e132342a">ShapeGroup::getCollisionObjects</a>(</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    std::vector&lt;<a class="code" href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt;FCL_PRECISION&gt;</a> *&gt; &amp;obj_vec)<span class="keyword"> const </span>{</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;  <span class="comment">// obj_vec.clear();</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> i : <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>) {</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    <span class="keyword">const</span> <a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object.html">FCLCollisionObject</a> *i_obj = <a class="code" href="namespacecollision_1_1solvers_1_1solver_f_c_l.html#ab54054c0932ec90631ea307be67c38fc">get_fcl_object_ptr</a>(i.get());</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <a class="code" href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt;FCL_PRECISION&gt;</a> *obj =</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        i_obj-&gt;<a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object.html#acdbdfc3018beb1aad01b4d8820d9ac59">getCollisionObject_fcl</a>().get(); <span class="comment">// TODO: thread-safety</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keywordflow">if</span> (obj)</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      obj_vec.push_back(obj);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;      <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  }</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;}</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#a8529ebb9d75bcccd8890b2ce92aba4f8">   33</a></span>&#160;std::vector&lt;std::set&lt;int&gt;&gt; <a class="code" href="classcollision_1_1_shape_group.html#a8529ebb9d75bcccd8890b2ce92aba4f8">ShapeGroup::overlapMap</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_shape_group.html">ShapeGroup</a> &amp;sg)<span class="keyword"> const </span>{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keywordtype">int</span> first_el_count = <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>.size();</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  std::vector&lt;std::set&lt;int&gt;&gt; ret(first_el_count);</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  std::vector&lt;std::pair&lt;int, int&gt;&gt; collid_list = <a class="code" href="classcollision_1_1_shape_group.html#aa2be19ed418e67c3351ae7e76ba2c78f">overlap</a>(sg);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> el : collid_list) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordtype">int</span> first_val = el.first;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">if</span> (first_val &gt; -1 &amp;&amp; first_val &lt; first_el_count) {</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      ret[first_val].insert(el.second);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    }</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  }</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;}</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#acb0954e873b8ebfdeafd277d98e967dc">   52</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="classcollision_1_1_shape_group.html#acb0954e873b8ebfdeafd277d98e967dc">ShapeGroup::elementCount</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>.size(); }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#ac6c6b853e11e3ae499f47b67855e4b1a">   54</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_shape_group.html#ac6c6b853e11e3ae499f47b67855e4b1a">ShapeGroup::rayTrace</a>(<span class="keyword">const</span> Eigen::Vector2d &amp;point1,</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                          <span class="keyword">const</span> Eigen::Vector2d &amp;point2,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                          std::vector&lt;LineSegment&gt; &amp;intersect)<span class="keyword"> const </span>{</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keywordtype">bool</span> res = <span class="keyword">false</span>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;obj : <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>) {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    res = obj-&gt;rayTrace(point1, point2, intersect) || res;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;std::vector&lt;std::pair&lt;int, int&gt;&gt;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#aa2be19ed418e67c3351ae7e76ba2c78f">   73</a></span>&#160;<a class="code" href="classcollision_1_1_shape_group.html#aa2be19ed418e67c3351ae7e76ba2c78f">ShapeGroup::overlap</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_shape_group.html">ShapeGroup</a> &amp;sg)<span class="keyword"> const </span>{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keyword">const</span> <a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_group.html">FCLCollisionObjectGroup</a> *fcl_gr_ptr_this =</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      <a class="code" href="namespacecollision_1_1solvers_1_1solver_f_c_l.html#a50aaacd0d14839e82e461617b0fba465">get_fcl_object_group_ptr</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keyword">const</span> <a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_group.html">FCLCollisionObjectGroup</a> *fcl_gr_ptr_sg = <a class="code" href="namespacecollision_1_1solvers_1_1solver_f_c_l.html#a50aaacd0d14839e82e461617b0fba465">get_fcl_object_group_ptr</a>(&amp;sg);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordflow">if</span> (!fcl_gr_ptr_this || !fcl_gr_ptr_sg) {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">throw</span>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  std::vector&lt;std::pair&lt;int, int&gt;&gt; ret;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <a class="code" href="namespacecollision_1_1solvers_1_1solver_f_c_l_1_1fcl__primitive__queries.html#a1ee5dc99b04ac808c89d4d7d60f5244b">fcl_primitive_queries::fcl_group_overlap</a>(*fcl_gr_ptr_this, *fcl_gr_ptr_sg,</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                                           ret);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;}</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keywordtype">int</span> ShapeGroup::addToIndex(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_collision_object.html">CollisionObject</a> &amp;obj, <span class="keywordtype">int</span> idx) {</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keyword">auto</span> el = <a class="code" href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">shapes_map_</a>.find(&amp;obj);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordflow">if</span> (el != <a class="code" href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">shapes_map_</a>.end()) {</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    el-&gt;second.push_back(idx);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    std::list&lt;int&gt; new_list;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    new_list.push_back(idx);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">shapes_map_</a>.emplace(&amp;obj, new_list);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#a933e2518682ca55b46f6c2d164b0b082">   99</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="classcollision_1_1_shape_group.html#a933e2518682ca55b46f6c2d164b0b082">ShapeGroup::queryContainedObjectIndexList</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_collision_object.html">CollisionObject</a> *pObj,</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                                              std::list&lt;int&gt; &amp;retlist)<span class="keyword"> const </span>{</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keyword">auto</span> el = <a class="code" href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">shapes_map_</a>.find(pObj);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keywordflow">if</span> (el != <a class="code" href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">shapes_map_</a>.end()) {</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    retlist.insert(retlist.end(), el-&gt;second.begin(), el-&gt;second.end());</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#afb47ff923d88542916722482044654f7">  110</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape_group.html#afb47ff923d88542916722482044654f7">ShapeGroup::print</a>(std::ostringstream &amp;stream)<span class="keyword"> const </span>{}</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#af7dae6147a3aac8fbd5342fe01765e34">  112</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape_group.html#af7dae6147a3aac8fbd5342fe01765e34">ShapeGroup::toString</a>(std::ostringstream &amp;stream)<span class="keyword"> const </span>{</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;ShapeGroup &quot;</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;         &lt;&lt; <span class="stringliteral">&quot;shapes: &quot;</span>;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;shape : <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>) {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    shape-&gt;toString(stream);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;\\ShapeGroup &quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;}</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a></div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#aa93ceeb9c9ad8722e6ff4f611cb2feb3">  122</a></span>&#160;<a class="code" href="classcollision_1_1_shape_group.html#aa93ceeb9c9ad8722e6ff4f611cb2feb3">ShapeGroup::timeSlice</a>(<span class="keywordtype">int</span> time_idx,</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                      <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> shared_ptr_this)<span class="keyword"> const </span>{</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keywordflow">return</span> shared_ptr_this;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#a0a570ef4b0d6ee7ea2f2f1721d528a43">  139</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape_group.html#a0a570ef4b0d6ee7ea2f2f1721d528a43">ShapeGroup::addToGroup</a>(<a class="code" href="namespacecollision.html#aeb672fde41a9aa0fcc1c5da8af2e4657">ShapeConstPtr</a> shape) {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>.push_back(shape);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  addToIndex(*shape, <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>.size() - 1);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <a class="code" href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">invalidateCollisionEntityCache</a>();</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#a795d9f262bafe8c33ebb33d8046e4073">  150</a></span>&#160;std::vector&lt;ShapeConstPtr&gt; <a class="code" href="classcollision_1_1_shape_group.html#a795d9f262bafe8c33ebb33d8046e4073">ShapeGroup::unpack</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>; }</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#a14fbbecda2dd65c9658089a4e665efb2">  152</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape_group.html#aa3a3e740ded6cd1b6207ea85bcffd99c">ShapeGroup::addParentMap</a>(</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    std::unordered_map&lt;<span class="keyword">const</span> <a class="code" href="classcollision_1_1_collision_object.html">CollisionObject</a> *,</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                       std::list&lt;CollisionObjectConstPtr&gt;&gt; &amp;parent_map,</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> parent)<span class="keyword"> const </span>{</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;shape : <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>) {</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    shape-&gt;addParentMap(parent_map, parent);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  }</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;}</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape_group.html#aa3a3e740ded6cd1b6207ea85bcffd99c">  161</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape_group.html#aa3a3e740ded6cd1b6207ea85bcffd99c">ShapeGroup::addParentMap</a>(</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    std::unordered_map&lt;<span class="keyword">const</span> <a class="code" href="classcollision_1_1_collision_object.html">CollisionObject</a> *,</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                       std::list&lt;CollisionObjectConstPtr&gt;&gt; &amp;parent_map)<span class="keyword"> const </span>{</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span> &amp;shape : <a class="code" href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">shapes_</a>) {</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    shape-&gt;addParentMap(parent_map, shared_from_this());</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  }</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;}</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize</a> {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;ICollisionObjectExport *exportObject(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_shape_group.html">collision::ShapeGroup</a> &amp;);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;serialize::ICollisionObjectExport *ShapeGroup::exportThis(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  <span class="keywordflow">return</span> serialize::exportObject(*<span class="keyword">this</span>);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;}</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;} <span class="comment">// namespace collision</span></div><div class="ttc" id="fcl__collision__queries_8h_html"><div class="ttname"><a href="fcl__collision__queries_8h.html">fcl_collision_queries.h</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a8529ebb9d75bcccd8890b2ce92aba4f8"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a8529ebb9d75bcccd8890b2ce92aba4f8">collision::ShapeGroup::overlapMap</a></div><div class="ttdeci">std::vector&lt; std::set&lt; int &gt; &gt; overlapMap(const ShapeGroup &amp;sg) const</div><div class="ttdoc">Returns lists of all objects from the other ShapeGroup that collide with each object of this ShapeGro...</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00033">shape_group.cc:33</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_aa93ceeb9c9ad8722e6ff4f611cb2feb3"><div class="ttname"><a href="classcollision_1_1_shape_group.html#aa93ceeb9c9ad8722e6ff4f611cb2feb3">collision::ShapeGroup::timeSlice</a></div><div class="ttdeci">virtual CollisionObjectConstPtr timeSlice(int time_idx, CollisionObjectConstPtr shared_ptr_this) const</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00122">shape_group.cc:122</a></div></div>
<div class="ttc" id="namespacecollision_html_aeb672fde41a9aa0fcc1c5da8af2e4657"><div class="ttname"><a href="namespacecollision.html#aeb672fde41a9aa0fcc1c5da8af2e4657">collision::ShapeConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const Shape &gt; ShapeConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00098">collision_object.h:98</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_group_html"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_group.html">collision::solvers::solverFCL::FCLCollisionObjectGroup</a></div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__object__group_8h_source.html#l00027">fcl_collision_object_group.h:27</a></div></div>
<div class="ttc" id="shape__group_8h_html"><div class="ttname"><a href="shape__group_8h.html">shape_group.h</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a795d9f262bafe8c33ebb33d8046e4073"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a795d9f262bafe8c33ebb33d8046e4073">collision::ShapeGroup::unpack</a></div><div class="ttdeci">std::vector&lt; ShapeConstPtr &gt; unpack() const</div><div class="ttdoc">Returns Vector of all shapes contained inside the ShapeGroup.</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00150">shape_group.cc:150</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_html"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object.html">collision::solvers::solverFCL::FCLCollisionObject</a></div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__object_8h_source.html#l00027">fcl_collision_object.h:27</a></div></div>
<div class="ttc" id="classfcl_1_1_collision_object_html"><div class="ttname"><a href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt; FCL_PRECISION &gt;</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html"><div class="ttname"><a href="classcollision_1_1_shape_group.html">collision::ShapeGroup</a></div><div class="ttdoc">ShapeGroup can contain simple shapes.</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8h_source.html#l00033">shape_group.h:33</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_object_ex_html_ab080033cf96284d10d0a7950bf2fd595"><div class="ttname"><a href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">collision::CollisionObjectEx::invalidateCollisionEntityCache</a></div><div class="ttdeci">void invalidateCollisionEntityCache(void)</div><div class="ttdef"><b>Definition:</b> <a href="collision__object__ex_8cc_source.html#l00043">collision_object_ex.cc:43</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_ac6c6b853e11e3ae499f47b67855e4b1a"><div class="ttname"><a href="classcollision_1_1_shape_group.html#ac6c6b853e11e3ae499f47b67855e4b1a">collision::ShapeGroup::rayTrace</a></div><div class="ttdeci">bool rayTrace(const Eigen::Vector2d &amp;point1, const Eigen::Vector2d &amp;point2, std::vector&lt; LineSegment &gt; &amp;intersect) const</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00054">shape_group.cc:54</a></div></div>
<div class="ttc" id="namespacecollision_html_a405f2c04407997fea529aad88f04ad30"><div class="ttname"><a href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionObject &gt; CollisionObjectConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00041">collision_object.h:41</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="namespacecollision_1_1solvers_1_1solver_f_c_l_html_ab54054c0932ec90631ea307be67c38fc"><div class="ttname"><a href="namespacecollision_1_1solvers_1_1solver_f_c_l.html#ab54054c0932ec90631ea307be67c38fc">collision::solvers::solverFCL::get_fcl_object_ptr</a></div><div class="ttdeci">const FCLCollisionObject * get_fcl_object_ptr(const CollisionObject *obj)</div><div class="ttdef"><b>Definition:</b> <a href="fcl__helpers_8h_source.html#l00046">fcl_helpers.h:46</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_af7dae6147a3aac8fbd5342fe01765e34"><div class="ttname"><a href="classcollision_1_1_shape_group.html#af7dae6147a3aac8fbd5342fe01765e34">collision::ShapeGroup::toString</a></div><div class="ttdeci">void toString(std::ostringstream &amp;stream) const</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00112">shape_group.cc:112</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_acb0954e873b8ebfdeafd277d98e967dc"><div class="ttname"><a href="classcollision_1_1_shape_group.html#acb0954e873b8ebfdeafd277d98e967dc">collision::ShapeGroup::elementCount</a></div><div class="ttdeci">int elementCount(void) const</div><div class="ttdoc">Returns count of contained objects.</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00052">shape_group.cc:52</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object_html_acdbdfc3018beb1aad01b4d8820d9ac59"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_collision_object.html#acdbdfc3018beb1aad01b4d8820d9ac59">collision::solvers::solverFCL::FCLCollisionObject::getCollisionObject_fcl</a></div><div class="ttdeci">std::shared_ptr&lt; fcl::CollisionObject&lt; FCL_PRECISION &gt; &gt; getCollisionObject_fcl(void) const</div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__object_8cc_source.html#l00132">fcl_collision_object.cc:132</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_aa2be19ed418e67c3351ae7e76ba2c78f"><div class="ttname"><a href="classcollision_1_1_shape_group.html#aa2be19ed418e67c3351ae7e76ba2c78f">collision::ShapeGroup::overlap</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; int, int &gt; &gt; overlap(const ShapeGroup &amp;sg) const</div><div class="ttdoc">Returns Vector of pairs of indexes of the intersecting objects within the ShapeGroup and another Shap...</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00073">shape_group.cc:73</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_afb47ff923d88542916722482044654f7"><div class="ttname"><a href="classcollision_1_1_shape_group.html#afb47ff923d88542916722482044654f7">collision::ShapeGroup::print</a></div><div class="ttdeci">virtual void print(std::ostringstream &amp;stream) const</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00110">shape_group.cc:110</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a933e2518682ca55b46f6c2d164b0b082"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a933e2518682ca55b46f6c2d164b0b082">collision::ShapeGroup::queryContainedObjectIndexList</a></div><div class="ttdeci">int queryContainedObjectIndexList(const CollisionObject *, std::list&lt; int &gt; &amp;retlist) const override</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00099">shape_group.cc:99</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a08ac93521a7fe97306acfc5cb3fa12a7"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a08ac93521a7fe97306acfc5cb3fa12a7">collision::ShapeGroup::shapes_map_</a></div><div class="ttdeci">std::unordered_map&lt; const CollisionObject *, std::list&lt; int &gt; &gt; shapes_map_</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8h_source.html#l00101">shape_group.h:101</a></div></div>
<div class="ttc" id="fcl__helpers_8h_html"><div class="ttname"><a href="fcl__helpers_8h.html">fcl_helpers.h</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_add8e127504ac6e95176a1709e132342a"><div class="ttname"><a href="classcollision_1_1_shape_group.html#add8e127504ac6e95176a1709e132342a">collision::ShapeGroup::getCollisionObjects</a></div><div class="ttdeci">int getCollisionObjects(std::vector&lt; fcl::CollisionObject&lt; FCL_PRECISION &gt; * &gt; &amp;obj_vec) const override</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00007">shape_group.cc:7</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_aea63e6d672588912102de4dbfc13ba19"><div class="ttname"><a href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">collision::serialize::serialize</a></div><div class="ttdeci">int serialize(const test::BroadphaseFailureCCObj &amp;bf_object, std::ostream &amp;output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="namespacecollision_1_1solvers_1_1solver_f_c_l_1_1fcl__primitive__queries_html_a1ee5dc99b04ac808c89d4d7d60f5244b"><div class="ttname"><a href="namespacecollision_1_1solvers_1_1solver_f_c_l_1_1fcl__primitive__queries.html#a1ee5dc99b04ac808c89d4d7d60f5244b">collision::solvers::solverFCL::fcl_primitive_queries::fcl_group_overlap</a></div><div class="ttdeci">int fcl_group_overlap(const FCLCollisionObjectGroup &amp;group_first, const FCLCollisionObjectGroup &amp;group_second, std::vector&lt; std::pair&lt; int, int &gt;&gt; &amp;retlist, std::vector&lt; std::pair&lt; int, int &gt;&gt; *missed_col_naive_in=0)</div><div class="ttdef"><b>Definition:</b> <a href="fcl__collision__queries_8h_source.html#l00144">fcl_collision_queries.h:144</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a654bb4a07dd22c21ddeb6d51541aa429"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a654bb4a07dd22c21ddeb6d51541aa429">collision::ShapeGroup::shapes_</a></div><div class="ttdeci">std::vector&lt; ShapeConstPtr &gt; shapes_</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8h_source.html#l00100">shape_group.h:100</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_object_html"><div class="ttname"><a href="classcollision_1_1_collision_object.html">collision::CollisionObject</a></div><div class="ttdoc">Base class for CollisionObjects and some of their groups.</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00047">collision_object.h:47</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_a0a570ef4b0d6ee7ea2f2f1721d528a43"><div class="ttname"><a href="classcollision_1_1_shape_group.html#a0a570ef4b0d6ee7ea2f2f1721d528a43">collision::ShapeGroup::addToGroup</a></div><div class="ttdeci">void addToGroup(ShapeConstPtr shape)</div><div class="ttdoc">Adds a simple shape to the ShapeGroup.</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00139">shape_group.cc:139</a></div></div>
<div class="ttc" id="namespacecollision_1_1solvers_1_1solver_f_c_l_html_a50aaacd0d14839e82e461617b0fba465"><div class="ttname"><a href="namespacecollision_1_1solvers_1_1solver_f_c_l.html#a50aaacd0d14839e82e461617b0fba465">collision::solvers::solverFCL::get_fcl_object_group_ptr</a></div><div class="ttdeci">const FCLCollisionObjectGroup * get_fcl_object_group_ptr(const CollisionObject *obj)</div><div class="ttdef"><b>Definition:</b> <a href="fcl__helpers_8h_source.html#l00031">fcl_helpers.h:31</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_group_html_aa3a3e740ded6cd1b6207ea85bcffd99c"><div class="ttname"><a href="classcollision_1_1_shape_group.html#aa3a3e740ded6cd1b6207ea85bcffd99c">collision::ShapeGroup::addParentMap</a></div><div class="ttdeci">virtual void addParentMap(std::unordered_map&lt; const CollisionObject *, std::list&lt; CollisionObjectConstPtr &gt;&gt; &amp;parent_map) const</div><div class="ttdef"><b>Definition:</b> <a href="shape__group_8cc_source.html#l00161">shape_group.cc:161</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
